:root {
  color-scheme: light;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3ff 100%);
  color: #1f2933;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

.topBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(26, 61, 122, 0.1);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topLeft {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navButton {
  border: none;
  padding: 8px 16px;
  border-radius: 22px;
  background: rgba(58, 85, 155, 0.12);
  color: #2b3d68;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.navButton:active {
  transform: scale(0.94);
}

.titleBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.subtitle {
  font-size: 12px;
  color: rgba(43, 61, 104, 0.72);
}

.actionGroup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actionButton,
.actionPrimary {
  border: none;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.actionButton {
  background: rgba(74, 108, 247, 0.12);
  color: #274060;
}

.actionButton:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.actionPrimary {
  background: linear-gradient(135deg, #4a6cf7 0%, #6f9dff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(80, 126, 255, 0.32);
}

.actionPrimary:active,
.actionButton:active:not(:disabled) {
  transform: translateY(1px);
}

.mainArea {
  flex: 1;
  display: flex;
  gap: 16px;
  padding: 16px 18px 20px;
}

.toolPanel {
  width: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(24, 57, 117, 0.12);
}

.toolGroupTitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(42, 61, 104, 0.65);
  text-transform: uppercase;
}

.toolButton {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: none;
  background: rgba(74, 108, 247, 0.08);
  color: #2b3d68;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.toolButtonActive {
  background: linear-gradient(160deg, #4a6cf7 0%, #769aff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(74, 108, 247, 0.35);
}

.toolButton:active {
  transform: scale(0.95);
}

.canvasContainer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stageHolder {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(74, 108, 247, 0.16), 0 20px 45px rgba(24, 57, 117, 0.18);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.2s ease, height 0.2s ease;
}

.stage {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(74, 108, 247, 0.04);
}

.bottomPanel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -18px 40px rgba(24, 57, 117, 0.12);
}

.paletteRow,
.sliderRow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.palette {
  display: flex;
  gap: 12px;
}

.colorOption {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(24, 57, 117, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border 0.18s ease;
}

.colorActive {
  border-color: rgba(74, 108, 247, 0.9);
  box-shadow: 0 8px 28px rgba(74, 108, 247, 0.35);
  transform: translateY(-2px);
}

.sliderRow {
  justify-content: space-between;
}

.bottomLabel {
  font-size: 12px;
  color: rgba(42, 61, 104, 0.75);
  min-width: 60px;
}

.sliderInput {
  flex: 1;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(74, 108, 247, 0.2);
  outline: none;
}

.sliderInput::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a6cf7 0%, #6f9dff 100%);
  box-shadow: 0 6px 12px rgba(80, 126, 255, 0.35);
}

.sliderInput::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a6cf7 0%, #6f9dff 100%);
  box-shadow: 0 6px 12px rgba(80, 126, 255, 0.35);
}

.sliderValue {
  min-width: 48px;
  text-align: right;
  font-size: 12px;
  color: rgba(42, 61, 104, 0.75);
}

@media (max-width: 960px) {
  .mainArea {
    flex-direction: column;
  }

  .toolPanel {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
  }

  .toolGroupTitle {
    font-size: 11px;
  }

  .toolButton {
    flex: 1;
    height: 48px;
    border-radius: 16px;
  }

  .canvasContainer {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .topBar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .actionGroup {
    width: 100%;
    justify-content: space-between;
  }

  .bottomPanel {
    padding: 18px 16px 24px;
  }

  .paletteRow,
  .sliderRow {
    flex-direction: column;
    align-items: flex-start;
  }

  .sliderRow {
    gap: 10px;
  }

  .sliderInput {
    width: 100%;
  }

  .sliderValue {
    align-self: flex-end;
  }
}


